import React from "react";

import { Link, Route, Routes } from "react-router-dom";

import "./App.css";

function Home() {
  return (
    <div>
      <p>Home</p>
    </div>
  );
}

function About() {
  return (
    <div>
      <p>About</p>
    </div>
  );
}

function App() {
  return (
    <>
      <h2>Router</h2>
      <nav>
        <Link to="/about">About</Link>&nbsp;|&nbsp;
        <Link to="/home">Home</Link>
      </nav>
      <hr />
      <Routes>
        <Route path="/" element={<div></div>}></Route>
        <Route path="/about" element={<About />} />
        <Route path="/home" element={<Home />} />
      </Routes>
    </>
  );
}

export default App;
